<html xmlns="http://www.w3.org/1999/html">
<head><!---->
    <title>imokay</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>
    <script type="text/javascript">
        $(function () {
            $.post(
                "hello",
                function (data) {
                    //alert(data);
                }
            )

        })
        //alert("888999")
    </script>
</head>

<script>
    //发送put.delete请求时,需要开启spring.mvc.hiddenmethod.filter.enabled=true
    //同时form表单默认支支持get,post,通过隐藏input标识请求类型
</script>

<form id="f1" action="test" method="get">
    <input type="text" name="name" value="get"/>get
    <input type="submit">
</form>
<form id="f2" action="test" method="post">
    <input type="text" name="name" value="post"/>post
    <input type="submit">
</form>
<form id="f3" action="test" method="post">
    <input type="hidden" name="_method" value="put">
    <input type="text" name="name" value="put"/>put
    <input type="submit">
</form>
<form id="f4" action="test" method="post">
    <input type="hidden" name="_method" value="delete">
    <input type="text" name="name" value="delete"/>delete
    <input type="submit">
</form>

<form id="f5" action="post/huershi/dasi/wuliu/wangmz?age=25&girlfriend=陈文丽" method="post">
    post请求参数获取----------------------------------
    <input type="text" name="name" value="wangmz"/>name
    <input type="text" name="age" value="25"/>age
    <input type="text" name="addr" value="hubei"/>addr
    <input type="submit">
</form>

<form id="f5" action="savePeople" method="post">
   自定义参数(1)----------------------------------
    </br>
    <input type="text" name="name" value="wangmz"/>name</br>
    <input type="text" name="addr" value="hubei"/>addr</br>
    <input type="text" name="pet.name" value="wqq"/>pet.name</br>
    <input type="text" name="pet.age" value="1"/>pet.age</br>
    <input type="text" name="pet.birth" value="2019"/>pet.birth</br>

    <input type="submit">
</form>

<form id="f5" action="savePeople" method="post">
    自定义参数(1)-------自定义转换器,将指定格式的 String转换为pet
    </br>
    <input type="text" name="name" value="wangmz"/>name</br>
    <input type="text" name="addr" value="hubei"/>addr</br>

    <input type="text" name="pet" value="wqq,1,2019"/>
    <!--<input type="text" name="pet.name" value="wqq"/>pet.name</br>
    <input type="text" name="pet.age" value="1"/>pet.age</br>
    <input type="text" name="pet.birth" value="2019"/>pet.birth</br>-->

    <input type="submit">
</form>


</html>